package com.pets.web.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.pets.web.entity.PetsOrders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author zhurenwang
 * @since 2024-05-26
 */
public interface PetOrdersMapper extends MPJBaseMapper<PetsOrders> {

    @Select("select sum(weight) from pets_orders where goods_id=#{goodsId} and status !=0")
    Long sumWeightByGoodsId(Integer goodsId);
}
